package java8NewFeatures.stream;

import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @author ldy
 * @data 2022/12/5
 * @description
 */
public class flatMapDemo {
    public static void main(String[] args) {

        ArrayList arrayList = new ArrayList();
        arrayList.add("asd");
        arrayList.add("asdasd");
        arrayList.add("asdwed");
        arrayList.add("aFWAEsd");

        System.out.println(arrayList.stream().collect(Collectors.joining(",")));
        System.out.println(StringUtils.join(arrayList,","));
    }
}
